package cn.reflection;

import java.io.IOException;
import java.io.Serializable;

/**
 * @auth wzy
 * @date 2023/9/26 15:21
 */
public class Person  extends BaseClass implements Serializable {

    private String name;
    static final int AGE = 30;
    protected String address;
    public String message;

    public Person(){
        System.out.println("Person()");
    }

    private Person(String name){
        this.name = name;
    }

    protected Person(String name, String address, String message){
        this.name = name;
        this.address = address;
        this.message = message;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    static final  int getAge(){
        return AGE;
    }

    protected String getAddress(){
        return address;
    }

    private void silentMethod()throws IOException,NullPointerException {
        System.out.println("这是悄悄话");
    }

    @Override
    public String toString() {
        return "Person{" +
                "name='" + name + '\'' +
                ", address='" + address + '\'' +
                ", message='" + message + '\'' +
                '}';
    }
}
